package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SFriendOnlineStatusMsg extends Object implements IMessageBase
    {
        public var fromPlayerId:int;
        public var fromPlayerName:String;
        public var entityId:SEntityId;
        public var toPlayerId:int;
        public var flag:int;
        public var onlinestatus:Boolean;
        public var fromPlayerLevel:int;
        public var VIP:int;
        public const _type:int = 12018;
        public static var _regist:SFriendOnlineStatusMsg = new SFriendOnlineStatusMsg(true);

        public function SFriendOnlineStatusMsg(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SFriendOnlineStatusMsg();
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.fromPlayerId);
            param1.writeString(this.fromPlayerName);
            this.entityId.__write(param1);
            param1.writeInt(this.toPlayerId);
            param1.writeInt(this.flag);
            param1.writeBool(this.onlinestatus);
            param1.writeInt(this.fromPlayerLevel);
            param1.writeByte(this.VIP);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.fromPlayerId = param1.readInt();
            this.fromPlayerName = param1.readString();
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.toPlayerId = param1.readInt();
            this.flag = param1.readInt();
            this.onlinestatus = param1.readBool();
            this.fromPlayerLevel = param1.readInt();
            this.VIP = param1.readByte();
            
        }

    }
}
